package a03_String;

/**
 * @Author quan
 * @Description 判断字符串是否由纯数字组成的字符串
 * @Date 2023/2/19 14:59
 */
public class IsNumStr {
    public static void main(String[] args) {
        String str = "1234hu45";
        System.out.println(isNumStr(str));
    }
    //
    public static boolean isNumStr(String str){
        for (int i = 0; i < str.length(); i++) {
            char ch = str.charAt(i);
            if(ch < '0' || ch > '9'){
                return false;
            }
        }
        return true;
    }
}
